/* 核心重置规则 */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  font-family: system-ui, -apple-system, sans-serif;
}

/* 移除列表样式 */
ol,
ul {
  list-style: none;
}

/* 媒体元素默认样式 */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 表单元素重置 */
input,
button,
textarea,
select {
  font: inherit;
  background: none;
  border: none;
  appearance: none;
}

button {
  cursor: pointer;
  background-color: transparent;
}

/* 移除默认聚焦样式 */
:focus:not(:focus-visible) {
  outline: none;
}

/* 表格重置 */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* 文本元素 */
a {
  text-decoration: none;
  color: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 禁用文字平滑 */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
}
